Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix percent logging #97

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Fix percent logging #97

merged 1 commit into from
Oct 6, 2023

Conversation

trvrnrth
Copy link
Contributor

@trvrnrth trvrnrth commented Oct 5, 2023

In file included from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/components/adc/adc_sensor.h:6,
                 from src/esphome.h:3,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::show_gauge(int, int, int, int, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:267:21: error: format '%d' expects argument of type 'int', but argument 5 has type 'double' [-Werror=format=]
       ESP_LOGD(TAG, "show_gauge 2 color %d", round(percent));
                     ^~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:72:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
 #define ESPHOME_LOG_FORMAT(format) format
                                    ^~~~~~
src/esphome/core/log.h:152:28: note: in expansion of macro 'esph_log_d'
 #define ESP_LOGD(tag, ...) esph_log_d(tag, __VA_ARGS__)
                            ^~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:267:7: note: in expansion of macro 'ESP_LOGD'
       ESP_LOGD(TAG, "show_gauge 2 color %d", round(percent));
       ^~~~~~~~
cc1plus: some warnings being treated as errors
*** [.pioenvs/mobile-pixel-clock/src/esphome/components/ehmtxv2/EHMTX.o] Error 1

@lubeda lubeda merged commit 04218b6 into lubeda:main Oct 6, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants